package com.oracle.outsidein.pool;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Data
public class ConvertResult {
    private int code = 0;
    private String result = "success";
    private long cost;
    private List<String> info;
    private List<String> error;

    public ConvertResult() {
    }

    public ConvertResult(int code, String result) {
        this.code = code;
        this.result = result;
    }

    public ConvertResult(List<String> info, List<String> error) {
        this.info = info;
        this.error = error;
    }

    public static ConvertResult ok() {
        return new ConvertResult();
    }

    public static ConvertResult ok(List<String> info, List<String> error) {
        return new ConvertResult(info, error);
    }

    public static ConvertResult err(int code, String result) {
        return new ConvertResult(code, result);
    }
}
